If you are talking about dev-cpp, then it has exactly the warnings that I posted, since it uses gcc behind the scenes, and that's the compiler I used (in fact, I have dev-cpp/bin as the path to the compiler). You just have to configure your project to have warnings enabled.
In my mind, you were thus a better programmer a few months ago. ;-)I know I may change those gotos, a few months ago I wouldn't even think about using gotos..
Not sure what the above two lines refers to. 2 more variables is usually not a big problem - particularly not local variables in a function, as those disappear again when you leave the function.I'll change for one srand in main.
Snake can be done even without the board that I used.
Very nice idea but I'll need to use 2 more variables is that still better?
The above is definitely bad coding, as there's no strict definition of whether the address calculation of tmp[i=0] or sampling the value of i happens first. Different compilers, or even the same compiler under different circumstances (e.g the code before this, the optimization settings, etc) will possibly do different things.Thank you, I appreciate your wish to help and believe me you do.
While writing the code I thought about using "while" instead of "for" but I have seen many times the kind of the writing above so I wrote this way.
See this: tmp[i=0]=i;
Not the same thing - although as long as you check "if (snd)" or "if (!snd)" then it would have the same effect - it just will be -1 instead of 1 when it's true.I am checking if there is no highscore.
I tried to do that using the EOF but it made some problem so I quit and do it in another way.
ok.
I tried to make something like this:
snd = !snd;
this way: snd = ~snd;
Being consistent is important - it's not paritcularly important if you use upper case, lower case or a mixture, as long as there is a defined and consistent pattern. Most people tend to use upper case only symbols for macros.ofcurse it doesn't work so I went to the "trust way".
You right again, I will move the "if" into the function.
"Why is the function "hidden_readonly" in upper-case when all other functions are lower-case?"
No reason, is that a problem?
Ok, so split your code differently, have a flag or some other solution for that - the 90% of the code equivalent should rule that you don't repeat it.
init() - cause of this: "printf ("#\n#");"
--
Mats



